package com.tqfframe.zuul;

import com.tqfframe.zuul.filter.PostEFilter;
import com.tqfframe.zuul.filter.ErrorExceptionFilter;
import com.tqfframe.zuul.filter.PreFilter;
import com.tqfframe.zuul.filter.SecondProFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

/**
 * Created by Tang-QiFeng on 2020/6/24
 */
@EnableZuulProxy
@SpringBootApplication
@EnableEurekaClient
public class GatewayServerApplication {
    public static void main( String[] args )
    {
        SpringApplication.run(GatewayServerApplication.class, args);
    }

    @Bean
    public PreFilter preFilter() {
        return new PreFilter();
    }

    @Bean
    public SecondProFilter secondProFilter() {
        return new SecondProFilter();
    }

    @Bean
    public ErrorExceptionFilter errorExceptionFilter() {
        return new ErrorExceptionFilter();
    }

    @Bean
    public PostEFilter postEFilter() {
        return new PostEFilter();
    }

}
